package com.dev.drawweb.model.service;

import com.dev.drawweb.model.mapper.StudentMapper;
import com.dev.drawweb.model.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentService {

    @Autowired
    StudentMapper studentMapper;

    public Student getStudentById(int id){ return studentMapper.getStudentById(id); }

    public int addStudent(Student student) {
        return studentMapper.addStudent(student);
    }

    public int updateStuPassword(int stuid,String password){
        return studentMapper.updateStuPassword(new Student(stuid,password));
    }
}
